import { useState } from 'react';
import { Slider, Toast,NavBar } from 'react-vant';
 
import { useNavigate } from "react-router-dom";
import './index.css'
const Index: React.FC = () => {
  const navigate = useNavigate();
 const [value, setValue] = useState(10);
  const onChangeAfter = (v:any) => Toast.info(`当前值：${v}`);
  return (
    <div>
      <NavBar title="屏幕亮度" onClickLeft={() => navigate(-1)} />
      <div className='boxsum'>
      <span className='sum'>☀</span>
       <Slider
      barHeight={4}
      activeColor="#333333"
      value={value}
      onChange={setValue}
      onChangeAfter={onChangeAfter}
    />
    <span className='sum1'>☀</span>
      </div>
    </div>
  );
};
export default Index;
